package org.wat.wcy.isi.mmazur.bp.io.xpdl;

import org.wat.wcy.isi.mmazur.bp.io.xpdl.processors.ArtifactsProcessor;
import org.wat.wcy.isi.mmazur.bp.io.xpdl.processors.AssociationsProcessor;
import org.wat.wcy.isi.mmazur.bp.io.xpdl.processors.MessagesFlowProcessor;
import org.wat.wcy.isi.mmazur.bp.io.xpdl.processors.PoolsProcessor;
import org.wat.wcy.isi.mmazur.bp.io.xpdl.processors.WorkflowProcessProcessor;


public enum XPDLProcessor {
	NULL("!") {
		@Override
		public IXMLProcessor getDocProcessor() {
			return null;
		}
	},
	WORKFLOW_PROCESS("/Package/WorkflowProcesses") {
		@Override
		public IXMLProcessor getDocProcessor() {
			return new WorkflowProcessProcessor();
		}
	},
	POOLS("/Package/Pools") {
		@Override
		public IXMLProcessor getDocProcessor() {
			return new PoolsProcessor();
		}
	},
	MESSAGE_FLOWS("/Package/MessageFlows") {
		@Override
		public IXMLProcessor getDocProcessor() {
			return new MessagesFlowProcessor();
		}
	},
	ARTIFACTS("/Package/Artifacts") {
		@Override
		public IXMLProcessor getDocProcessor() {
			return new ArtifactsProcessor();
		}
	},
	ASSOCIATIONS("/Package/Associations") {
		@Override
		public IXMLProcessor getDocProcessor() {
			return new AssociationsProcessor();
		}
	};
	String pattern;
	
	XPDLProcessor(String pattern) {
		this.pattern = pattern;
	}
	
	public abstract IXMLProcessor getDocProcessor();
}